<div>
    <h3>Теги</h3>
<?php
if (isset($tags) && is_array($tags)) {
    foreach ($tags as $tag){
?>
<a href="<?=$baseUrl?>/tag/<?=$tag['id']?>"><?=$tag['name']?>:<?=$tag['count']?></a><br/>
<?php
    }
}
?>
</div>